local jiangnu_viewas = fk.CreateSkill{
  name = "#th_jiangnu_viewas",
}

jiangnu_viewas:addEffect("viewas", {
  card_filter = function (self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).color == Card.Black
  end,
  view_as = function(self, player, cards)
    local card = Fk:cloneCard("duel")
    if self.skillName then
      card.skillName = self.skillName
    end
    if #cards == 0 then
      return
    else
      card:addFakeSubcards(cards)
    end
    if player:prohibitUse(card) then return nil end -- FIXME: 修复合法性判断后删除此段

    return card
  end,
})

jiangnu_viewas:addAI(nil, "vs_skill")

return jiangnu_viewas
